From 99494e0b1a3574d0e4093d456c1b7d0c43b5f42d Mon Sep 17 00:00:00 2001 From: Jan Heller Date: Tue, 3 Jun 2008 14:11:34 +0000 Subject: [PATCH] babl_get_version () moved into separate source file. 2008-06-03 Jan Heller babl_get_version () moved into separate source file. * babl/Makefile.am: Added babl-version.c. * babl/babl-version.c (babl_get_version): Implemented. * babl/babl-version.h.in: Added babl_get_version () declaration. * babl/babl.c: Removed babl_get_version (). * babl/babl.h: Removed babl_get_version () declaration. svn path=/trunk/; revision=321 --- ChangeLog | 10 ++++++++++ babl/Makefile.am | 3 ++- babl/babl-version.c | 35 +++++++++++++++++++++++++++++++++++ babl/babl-version.h.in | 5 +++++ babl/babl.c | 15 --------------- babl/babl.h | 5 ----- 6 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 babl/babl-version.c diff --git a/ChangeLog b/ChangeLog index 1b7cf03..e4eda5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-03 Jan Heller + + babl_get_version () moved into separate source file. + + * babl/Makefile.am: Added babl-version.c. + * babl/babl-version.c (babl_get_version): Implemented. + * babl/babl-version.h.in: Added babl_get_version () declaration. + * babl/babl.c (babl_destroy): Removed babl_get_version (). + * babl/babl.h: Removed babl_get_version () declaration. + 2008-06-03 Jan Heller * babl/babl-version.h.in: Added. diff --git a/babl/Makefile.am b/babl/Makefile.am index c9efede..5b35869 100644 --- a/babl/Makefile.am +++ b/babl/Makefile.am @@ -30,7 +30,8 @@ c_sources = \ babl-util.c \ babl-list.c \ babl-hash-table.c \ - babl-cpuaccel.c + babl-cpuaccel.c \ + babl-version.c h_sources = \ babl-db.h \ diff --git a/babl/babl-version.c b/babl/babl-version.c new file mode 100644 index 0000000..b1805ef --- /dev/null +++ b/babl/babl-version.c @@ -0,0 +1,35 @@ +/* babl - dynamically extendable universal pixel conversion library. + * Copyright (C) 2005-2008, Øyvind Kolås and others. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see + * . + */ + +#include "babl-internal.h" + + +void +babl_get_version (int *major, + int *minor, + int *micro) +{ + if (major != NULL) + *major = BABL_MAJOR_VERSION; + + if (minor != NULL) + *minor = BABL_MINOR_VERSION; + + if (micro != NULL) + *micro = BABL_MICRO_VERSION; +} diff --git a/babl/babl-version.h.in b/babl/babl-version.h.in index aa8b3f9..40d3930 100644 --- a/babl/babl-version.h.in +++ b/babl/babl-version.h.in @@ -31,4 +31,9 @@ #define BABL_MINOR_VERSION @BABL_MINOR_VERSION@ #define BABL_MICRO_VERSION @BABL_MICRO_VERSION@ +/** Get the version information on the babl library */ +void babl_get_version (int *major, + int *minor, + int *micro); + #endif diff --git a/babl/babl.c b/babl/babl.c index d672c75..97ec6fc 100644 --- a/babl/babl.c +++ b/babl/babl.c @@ -74,18 +74,3 @@ babl_destroy (void) babl_memory_sanity (); } } - -void -babl_get_version (int *major, - int *minor, - int *micro) -{ - if (major != NULL) - *major = BABL_MAJOR_VERSION; - - if (minor != NULL) - *minor = BABL_MINOR_VERSION; - - if (micro != NULL) - *micro = BABL_MICRO_VERSION; -} diff --git a/babl/babl.h b/babl/babl.h index bf46ef0..019f96a 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -81,11 +81,6 @@ void babl_init (void); */ void babl_destroy (void); -/** Get the version information on the babl library */ -void babl_get_version (int *major, - int *minor, - int *micro); - #if __GNUC__ >= 4 #define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__)) #else -- 2.30.2